package com.lwp.test.spring;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextStartedEvent;
import org.springframework.stereotype.Component;

/**
 * 监听所有ApplicationEvent事件
 * <p>
 *     ContextRefreshedEvent
 * </p>
 */
@Component
public class ApplicatiListener implements ApplicationListener {


    @Override
    public void onApplicationEvent(ApplicationEvent applicationEvent) {
        System.out.println("********* ApplicatiListener  9999999999999999999999999 " + applicationEvent.getClass().getName());
        System.out.println("------------------ " + Thread.currentThread().getId() + " " + Thread.currentThread().getName());
    }
}
